home *** CD-ROM | disk | FTP | other *** search
- /* XDialog.h
- *
- * This contains the declarations for both the modal and the
- * modeless dialog boxes
- */
-
- /* YAAF - Yet another application framework
- * Copyright (C) 1997 William Edward Woody and In Phase Consulting
- *
- * This library is free software; you can redistribute it
- * and/or modify it under the terms of the GNU Library
- * General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or any
- * later version.
- *
- * This library is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABIILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Library General Public License for
- * more details.
- *
- * You should have received a copy of the GNU Library General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * To contact the author, either e-mail me at
- * woody@alumni.caltech.edu, or write to us at
- *
- * William Edward Woody
- * In Phase Consulting
- * 1545 Ard Eevin Avenue
- * Glendale, CA 91202
- */
-
- #ifndef __XDIALOG_H__
- #define __XDIALOG_H__
-
- #include <XWindow.h>
-
- #if defined(__MWERKS__)
- #if defined(macintosh)
- #pragma options align=power
- #endif
- #if defined(__INTEL__)
- #pragma pack(push,2)
- #endif
- #endif
-
- /************************************************************************/
- /* */
- /* Forwards */
- /* */
- /************************************************************************/
-
- class XGDialog;
-
- /************************************************************************/
- /* */
- /* Modal Dialog Declarations */
- /* */
- /************************************************************************/
-
- /*
- * Procedure callback
- */
-
- typedef long (*XGPDialogProc)(XGDialog *,void *,long,long,void *);
-
- /* XGDialog
- *
- * This is the dialog box declaration. This declaration is set
- * up so I can be created either modal or modeless; modal dialogs
- * should use the modal dialog function setup given below
- */
-
- class XGDialog : public XGWindow {
- public:
- XGDialog(XGSWindowInitRecord &);
- XGDialog(XGArgStream &);
- virtual ~XGDialog();
- bool CloseWindow();
-
- /*
- * Modeless creation/destruction
- */
-
- static XGDialog *Create(short,XGPDialogProc, void *);
-
- /*
- * Modal creation/destruction
- */
-
- static long ModalDialog(short,XGPDialogProc, void *);
-
- /*
- * End the dialog
- */
-
- void EndDialog(long v);
-
- /*
- * Message management
- */
-
- long ReceiveDispatch(long,long,void *);
-
- private:
- long SendMessage(long,long,void *);
-
- long fTermValue;
- bool fTerminate;
- bool fModal;
- void *fDataPtr;
- XGPDialogProc fDialogProc;
- };
-
-
-
- #if defined(__MWERKS__)
- #if defined(macintosh)
- #pragma options align=reset
- #endif
- #if defined(__INTEL__)
- #pragma pack(pop)
- #endif
- #endif
-
-
- #endif // __XDIALOG_H__
-